import request from '@/utils/request'

// 店铺列表
export function getStoreList(data: any) {
  return request({
    url: '/supplier/shop/list',
    method: 'get',
    params: data,
  })
}

// 店铺审核
export function approveStore(data: any) {
  return request({
    url: '/supplier/shop/audit_status',
    method: 'post',
    data,
  })
}

// 店铺信息
export function getStoreInfo(data: any) {
  return request({
    url: '/supplier/shop/info',
    method: 'get',
    params: data,
  })
}

//设置品牌
export function setBrand(data: any) {
  return request({
    url: '/supplier/shop/relation_brand',
    method: 'post',
    data,
  })
}

// 设置业务员
export function setSalesman(data: any) {
  return request({
    url: '/supplier/shop/set_sales_person',
    method: 'post',
    data,
  })
}

// 设置折扣
export function setDiscount(data: any) {
  return request({
    url: '/supplier/shop/set_discount',
    method: 'post',
    data,
  })
}

// 获取业务员列表
export function getSalesmanList(data: any) {
  return request({
    url: '/supplier/shop/sales_person_list',
    method: 'get',
    params: data,
  })
}

// 获取品牌列表
export function getBrandList(data: any) {
  return request({
    url: '/supplier/shop/brand_list',
    method: 'get',
    params: data,
  })
}

//审核店铺数据
export function auditStore(data: any) {
  return request({
    url: '/supplier/shop/audit_status',
    method: 'post',
    data,
  })
}

// 获取所有店铺 不包括未审核以及禁用
export function getAllStoreList() {
  return request({
    url: '/supplier/shop/all',
    method: 'get',
  })
}
